
FUNCTION_BLOCK DAC_ByteToBits
TITLE = 'DAC_ByteToBits'
//
// This functionblock convert the input byte to 8 single bit
//
// Versionshistory:
// 1.0 Ersterstellung E.Dittmann

VERSION : '1.0'
AUTHOR  : 'Lenze'
FAMILY  : 'DAC'
NAME : 'byToBit'
KNOW_HOW_PROTECT

VAR_INPUT
    byInput:                BYTE;
    xbyInput AT byInput:    ARRAY[0..7] OF BOOL;
END_VAR

VAR_OUTPUT
    xBit0:                  BOOL;
    xBit1:                  BOOL;
    xBit2:                  BOOL;
    xBit3:                  BOOL;
    xBit4:                  BOOL;
    xBit5:                  BOOL;
    xBit6:                  BOOL;
    xBit7:                  BOOL;    
END_VAR


VAR_IN_OUT

END_VAR


VAR
    
END_VAR

        
BEGIN
    xBit0:=xbyInput[0];
    xBit1:=xbyInput[1];
    xBit2:=xbyInput[2];
    xBit3:=xbyInput[3];
    xBit4:=xbyInput[4];
    xBit5:=xbyInput[5];
    xBit6:=xbyInput[6];
    xBit7:=xbyInput[7];
    
    
    
    
END_FUNCTION_BLOCK


